﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _008热水器
{
    /// <summary>
    /// 显示器
    /// </summary>
    class ScreenLCD
    {
        public ScreenLCD(Heater heater)
        {
            heater.temperatureEvent += TemperatureScreen;//订阅水温事件
        }

        //显示温度
        public void TemperatureScreen(int temperature)
        {
            Console.WriteLine("显示器:当前温度是:" + temperature);
        }
    }
}
